package models

type GoodsSpec struct{
	Id int `json:"id" gorm:"column:id;primary_key" form:"id"`
	GoodsId int `json:"goods_id" gorm:"column:goods_id" form:"goods_id"`
	Title string `json:"title" gorm:"column:title" form:"title"`
	Price float64 `json:"price" gorm:"column:price" form:"price"`
	Num int `json:"num" gorm:"column:num" form:"num"`
	Def int `json:"def" gorm:"column:def" form:"def"`
	SpecCode string `json:"spec_code" gorm:"column:spec_code" form:"spec_code"`
	GoodsImage []GoodsImage `json:"goods_image" gorm:"ForeignKey:SpecId;AssociationForeignKey:Id"`
}
func (GoodsSpec) TableName() string {
	return "goods_spec"
}